<template>
<!-- 这是分页 -->
  <div id="paging">
    <!-- 分页 -->
    <div class="pagination">
      <el-pagination
        background
        @current-change="handleCurrentChange"
        :current-page.sync="obj.currentPage"
        :page-size="obj.pageSize"
        layout="total, prev, pager, next, jumper"
        :total="obj.totals">
      </el-pagination>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    obj: {
      type: Object,
    }
  },
  data () {
    return {
      
    }
  },
  methods: {
    // 分页监听当前所在页数
    handleCurrentChange(val) {
      this.$emit("page", val);
    },
  }
}
</script>

<style lang="less" scoped>
.pagination{
  width: 100%;
  margin-top: 35px;
  margin-bottom: 50px;
  text-align: center;
}
/deep/ .el-input {
  width: 46px !important;
}
/deep/ .el-pagination span:not([class*=suffix]){
  font-size: 15px;
}
/deep/ .el-pagination button{
  height: 30px;
}
/deep/ .el-pagination.is-background .btn-prev{
  min-width: 32px;
}
/deep/ .el-pager li{
  height: 30px;
  line-height: 30px;
  font-size: 15px;
}
/deep/ .el-pagination.is-background .el-pager li{
  min-width: 32px;
}
/deep/ .el-pagination .btn-prev .el-icon{
  font-size: 18px;
}
/deep/ .el-pagination .btn-next .el-icon{
  font-size: 18px;
}
</style>